package oa.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import jxl.common.Logger;
import oa.bean.Goods;
import oa.dao.GoodsMapper;
import oa.service.GoodsService;
@Service
public class GoodsServiceImpl implements GoodsService {
	Logger log = Logger.getLogger(GoodsServiceImpl.class);
	@Resource
	private GoodsMapper goodsMapper;
	@Override
	public List<Goods> getGoodById(Goods goods) {
		
		return goodsMapper.getGoodById(goods);
	}

	@Override
	public List<Goods> getAll() {
		return goodsMapper.getAll();
	}

	@Override
	public List<Goods> getGoodByName(String goods) {
		return goodsMapper.getGoodByName(goods);
	}

	@Override
	public int delete(Goods goods) {
		return goodsMapper.delete(goods);
	}

	@Override
	public int update(Goods goods) {
		return goodsMapper.update(goods);
	}

	@Override
	public int insert(Goods goods) {
		return goodsMapper.insert(goods);
	}

	@Override
	public int updatezt(String id, String gstatus) {
		log.debug("zhuangtai"+gstatus);
		log.debug("id"+id);
		return goodsMapper.updatezt(id, gstatus);
	}

}
